﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCMenhGia.ascx.cs" Inherits="Admin_UCControls_UCMenhGia" %>

<table width="100%">
 
    <tr>
        <td>
            <asp:GridView ID="GridMenhGia" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
               OnRowCommand="GridMenhGia_RowCommand"  
                CssClass="mGrid"  
                PagerStyle-CssClass="pgr"  
                AlternatingRowStyle-CssClass="alt">
                <Columns>
                   <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                         <%# Container.DataItemIndex + 1 %>  
                    </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Mệnh gi&#225;">
                        <ItemTemplate>
                            <%# Convert.ToDouble(Eval("LoaiMenhGia")).ToString("0,000.##")%>
                        </ItemTemplate>
                        <ItemStyle CssClass="numberRight" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                       <ItemTemplate>
                        <asp:LinkButton ID="btnSua" runat="server" Text="Sửa" CommandName="Sua" CommandArgument='<%#Bind("Id")%>' />
                         &nbsp;&nbsp;<asp:linkButton ID="btnXoa" runat="server" Text="Xóa" CommandName="Xoa" CommandArgument='<%#Bind("Id")%>' OnClientClick="javascript:return confirm('Có chắc xóa Mệnh Giá này không?');"/>
                  </ItemTemplate>
                        <ItemStyle Width="65px" />
                    </asp:TemplateField>
                </Columns>
                <PagerStyle CssClass="pgr" />
                <AlternatingRowStyle CssClass="alt" />
            </asp:GridView>
        </td>
    </tr>
     <tr>
    <td style="padding-top:5px">
        <asp:Button ID="btnThemMoi" runat="server" Text="Thêm mới" OnClick="btnThemMoi_Click" /></td>
    </tr>
</table>
<br />
